package com.cjy.ExecutorService;

import java.util.ArrayList;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class TestExecutorService {
    public static void main(String[] args) {
        ExecutorService executor = Executors.newCachedThreadPool();
        ArrayList<Student> list = new ArrayList<>();
        list.add(new Student(1,"A",20));
        list.add(new Student(2,"B",20));
        list.add(new Student(3,"C",20));
        list.add(new Student(4,"D",20));
        executor.execute(new Other("你好"));
        executor.execute(new Other("再见"));
        executor.execute(new RunnableTest(list));
    }
}
